home *** CD-ROM | disk | FTP | other *** search
- Path: news.tu-chemnitz.de!news
- From: hfst@hrz.tu-chemnitz.de (Hans Steffani)
- Newsgroups: comp.lang.c
- Subject: Re: Newbie question: Is this code OK?
- Date: 18 Jan 96 07:21:44 GMT
- Organization: University of Technology Chemnitz, FRG
- Message-ID: <4dksom$kkn@pyrrhus-f.hrz.tu-chemnitz.de>
- References: <4di986$fk1@pegasus.interpac.net> <4dj7gp$e1o@beach.and.nl>
- NNTP-Posting-Host: mmu.hrz.tu-chemnitz.de
-
- jos@and.nl (Jos A. Horsmeier) writes:
-
- >Let's turn this pseudo cody thingy into a C function; we represent stateA
- >by an int 1 (or any other non-zero value) and stateB by an int 0.
-
- Maybe this could be good example for using enums. What about
- enum {stateA, stateB} state = StateB;
-
- you also have to change the second if.
-
- Hans Friedrich Steffani
- --
- Hans Friedrich Steffani
- Institut fuer Elektrische Maschinen und Antriebe
- TU Chemnitz-Zwickau
- e-mail: hans.steffani@e-technik.tu-chemnitz.de
-